<HTML><HEAD><TITLE>concat_string(++List, -Dest)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Strings and Atoms</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>concat_string(++List, -Dest)</H1>
Succeeds if Dest is the concatenation of the atomic terms contained in
List.


<DL>
<DT><EM>List</EM></DT>
<DD>List of atomic terms.
</DD>
<DT><EM>Dest</EM></DT>
<DD>String or variable.
</DD>
</DL>
<H2>Description</H2>
   Dest is unified with the concatenation of the atomic terms contained in
   List.  List may contain numbers, atoms and strings.  The result of the
   concatenation is always a string.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>concat_string(++, -) is det
</UL>
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>List is not instantiated (non-coroutine mode only).
<DT><EM>(4) instantiation fault </EM>
<DD>List contains free variables (non-coroutine mode only).
<DT><EM>(5) type error </EM>
<DD>List is instantiated, but not to a list of atomic terms.
<DT><EM>(5) type error </EM>
<DD>Dest is neither an string nor a variable.
</DL>
<H2>Examples</H2>
<PRE>
Success:
      concat_string([abc,def],"abcdef").

      concat_string(["Str1","Str2"],X).
                             X = "Str1Str2".

      concat_string([the,man," is aged ",20],X).
                             X = "theman is aged 20".

      concat_string([1,2,3],X).
                             X = "123".

Fail:
      concat_string([ab,bc],"abc").

Error:
      concat_string(A,X).        (Error 4).
      concat_string([abc,D],X).  (Error 4).
      concat_string(art,X).      (Error 5).



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/stratom/concat_atom-2.html">concat_atom / 2</A>, <A HREF="../../kernel/stratom/concat_strings-3.html">concat_strings / 3</A>, <A HREF="../../kernel/stratom/append_strings-3.html">append_strings / 3</A>, <A HREF="../../kernel/stratom/atom_string-2.html">atom_string / 2</A>, <A HREF="../../kernel/stratom/join_string-3.html">join_string / 3</A>, <A HREF="../../kernel/stratom/split_string-4.html">split_string / 4</A>, <A HREF="../../kernel/ioterm/sprintf-3.html">sprintf / 3</A>
</BODY></HTML>
